import request from '@/utils/request'

// 查询医生患者列表
export function listPatient(query) {
  return request({
    url: '/system/patient/list',
    method: 'get',
    params: query
  })
}

// 查询医生患者详细
export function getPatient(patientName) {
  return request({
    url: '/system/patient/' + patientName,
    method: 'get'
  })
}

// 新增医生患者
export function addPatient(data) {
  return request({
    url: '/system/patient',
    method: 'post',
    data: data
  })
}

// 修改医生患者
export function updatePatient(data) {
  return request({
    url: '/system/patient',
    method: 'put',
    data: data
  })
}

// 删除医生患者
export function delPatient(doctorId) {
  return request({
    url: '/system/patient/' + doctorId,
    method: 'delete'
  })
}
